<?php 

class CardapioModel extends GenericModel{
  
  public function __construct(){
    $this->setTableName('tb_cardapio');
    parent::__construct();
  }
  
  public function buscarCardapiosPorRestaurante($idRestaurante){
    $querySql = "SELECT * from tb_cardapio c inner join tb_cardapio_restaurante cr 
                on c.id = cr.id_cardapio WHERE cr.id_restaurante = ?";
    return $this->query($querySql, array($idRestaurante));
  }
}
?>